import service from '@/utils/request'
//服务代理
export const getServiceList = (pageIndex = 1, pageSize = 10) => {
    return service({
      url: '/service/getServiceList',
      method: 'get',
      params: {
        pageIndex,
        pageSize,
      },
    })
  }

  export const addServices = (data) => {
    return service({
      url: '/service/addService',
      method: 'post',
      data:data
    })
  }

  export const deleteServices = (data) => {
    return service({
      url: '/service/deleteService',
      method: 'delete',
      data:data
    })
  }

  export const updateServices = (data) => {
    return service({
      url: '/service/updateService',
      method: 'put',
      data:data
    })
  }


  export const getServiceConfigList = (pageIndex,pageSize,ServiceId) => {
    return service({
      url: '/service/getServiceConfigList',
      method: 'get',
      params: { pageIndex,pageSize,ServiceId: ServiceId } ,
    })
  }
export const addServiceConfig = (data) => {
  return service({
    url: '/service/addServiceConfig',
    method: 'post',
    data:data
  })
}

export const deleteServiceConfig = (data) => {
  return service({
    url: '/service/deleteServiceConfig',
    method: 'delete',
    data: data
  });
};

//服务能力配置
export const getCapabilityList = (pageIndex,pageSize,ServiceId) => {
  return service({
    url: '/service/getServiceItems',
    method: 'get',
    params: { pageIndex,pageSize,ServiceId: ServiceId } ,
  })
}

export const addCapability = (data) => {
  return service({
    url: '/service/regisServiceItem',
    method: 'post',
    data:data
  })
}

export const deleteCapability = (data) => {
  return service({
    url: '/service/deleteAServiceItem',
    method: 'post',
    data: data
  });
};